home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.1 / Examples1 / PCMCIA / Readme.Tools < prev    next >
Encoding:
Text File  |  1999-10-27  |  10.5 KB  |  289 lines

  1.  
  2. Credit Card Tools    Beta 4        7-Jan-93
  3.  
  4. (c) Copyright 1991-1999 Amiga, Inc.  All Rights Reserved
  5. Preliminary
  6.  
  7.    ************************************************************************
  8.    *                                      *
  9.    *                COPYRIGHTED DEVELOPER MATERIALS                *
  10.    *                                      *
  11.    ************************************************************************
  12.  
  13.    THIS SOFTWARE AND INFORMATION IS COPYRIGHTED.
  14.  
  15.    THIS SOFTWARE AND INFORMATION MAY NOT BE REDISTRIBUTED, DISCLOSED,
  16.    OR DUPLICATED, IN WHOLE OR IN PART, IN ANY MANNER OTHER THAN AS
  17.    SPECIFIED IN A SIGNED AGREEMENT WITH AMIGA.
  18.  
  19.    ************************************************************************
  20.    *                                      *
  21.    *                DISCLAIMER                  *
  22.    *                                      *
  23.    *   THIS SOFTWARE AND INFORMATION IS PROVIDED "AS IS".          *
  24.    *   NO REPRESENTATIONS OR WARRANTIES ARE MADE WITH RESPECT TO THE      *
  25.    *   ACCURACY, RELIABILITY, PERFORMANCE, CURRENTNESS, OR OPERATION      *
  26.    *   OF THIS SOFTWARE AND INFORMATION, AND ALL USE IS AT YOUR OWN RISK. *
  27.    *   NEITHER AMIGA NOR THE AUTHORS ASSUME ANY RESPONSIBILITY OR      *
  28.    *   LIABILITY WHATSOEVER WITH RESPECT TO YOUR USE OF THIS SOFTWARE      *
  29.    *   AND INFORMATION.                              *
  30.    *                                      *
  31.    ************************************************************************
  32.  
  33.  
  34. These tools allow you to format a PCMCIA RAM credit
  35. card in an A600/A1200 credit card slot as an Amiga floppy, or loadseg
  36. a RomTagged Amiga executable for execute-in-place.
  37.  
  38. A new tool called "Flash" lets you burn an Intel-type flashrom
  39. card from a floppy disk image or binary file.
  40.  
  41. NOTE: The Prepcard and Install programs are no longer provided here
  42. since they are now part of the 3.0 Workbench distribution.
  43. The description of these tools is still provided for your
  44. information.
  45.  
  46.  
  47. Prepcard
  48. ========
  49. The "Prepcard" tool can format a RAM credit card as either an
  50. Amiga diskette (CC0:) or as system RAM.
  51.  
  52. If formatted as an Amiga disk, you can copy files to it (CC0:) like
  53. any other diskette.  You can make it bootable by using the new Install
  54. command provided on this disk.
  55.  
  56. If formatted as system RAM, it will be added to the system as RAM
  57. if you boot with the card inserted.
  58.  
  59.  
  60.  
  61. Install
  62. =======
  63. The new "install" command can install (ie. make bootable) a RAM
  64. credir card which has been formatted as an Amiga diskette
  65. via Prepcard.   Note that the correct version of Install should come
  66. with the A600/A1200.
  67.  
  68. Usage:  Install drive CC0:
  69.  
  70.  
  71.  
  72. Flash
  73. =====
  74.  
  75. FLASH is a tool for copying disk-like media (diskette or RAD) or binary
  76. files to PCMCIA FlashROM cards.
  77.  
  78. Currently only the Intel FlashROM programming algorithim is supported.
  79. In the future, algorithims for EEPROM, and Epson FlashROM may be
  80. supported.  The Flash tool verifies that the FlashROM card you
  81. insert returns the Intel identifier byte before it erases, or writes
  82. to the card.  See Flash.doc for more info.
  83.  
  84. Warning: When you use Flash to put a disk image on a FlashROM card,
  85. an exact duplicate disk is created.  Do not access the original disk
  86. or the new FlashROM duplicate via DOS while both are mounted - it
  87. will confuse DOS and cause problems.
  88.  
  89.  
  90. AmigaXIP
  91. ========
  92. The "loadc" command can loadseg a romtagged Amiga executable to
  93. a not-in-use RAM credit card.  Loadc will automatically create
  94. and store the necessary PCMCIA tuples in the card to identify the
  95. code as Amiga execute-in-place (XIP) code.  A sample execute-in-place
  96. executable "xipcode" is provided.  See the AmigaXIP.ReadMe in that
  97. directory for more info.  Note that DOS and Intuition are not available
  98. at RomTag init time for AmigaXIP code (but your code can open intuition).
  99. AmigaXIP code must either be written to run in rom (ie. no global
  100. variables in program or data space) or must loadseg itself into RAM
  101. (if you need to loadseg yourself into system RAM to run, you could use
  102. the loadseg.asm code as an example of how to do this).  Alternately,
  103. you could use craft a combination boot disk and hidden execute-in-place
  104. card (see AmigaXIP.ReadMe).
  105.  
  106.      AmigaXIP (dir)
  107.        loadc                            loadseg.asm
  108.        AmigaXIP.ReadMe                  xipcode
  109.        xipcode.asm
  110.  
  111.  
  112.  
  113. CARDRES
  114. =======
  115. For developers who might require lower-level control of the credit
  116. card resource, included here are Release 3.0 autodocs and include files.
  117. Most developers do not need to call any of these functions.
  118. However, much Amiga-specific information about PCMCIA is contained
  119. in the text and comments.  Definitions for actual PCMCIA standard
  120. tuple values are not included.  See the PCMCIA Card Standard for these
  121. values. The PCMCIA Card Standard is available to registered US developers
  122. through CATS US.  Other registered developers should be able to purchase
  123. the the spec through their local support material supplier.
  124. Non-registered developers may try contacting the publisher: PCMCIA,
  125. 1030B East Duane Ave., Sunnyvale, CA. 94086.
  126.  
  127.  
  128.      cardres (dir)
  129.        card.h                           card.i
  130.        cardres.doc                      card_lib.fd
  131.  
  132.  
  133.  
  134.  
  135. NOTES ON PCMCIA CARDS
  136. =====================
  137.  
  138. PCMCIA
  139. ======
  140. The PCMCIA spec describes a standard for identifying
  141. the contents of credit card RAM, ROM, and device cards.
  142. This standard requires a chain of "tuples" which describe
  143. the card, and its data areas, and where the data areas
  144. reside.  These tuples are described in the PCMCIA spec.
  145. This thick PCMCIA Card Standard spec is available to
  146. registered US developers from CATS US.
  147.  
  148. Ram cards versus flashrom
  149. =========================
  150.  
  151. All ram cards contain "common" memory.
  152. This is the 256K or 512K (or more) of memory stated on the card.
  153. This memory appears in the A600/A1200 at address $600000.
  154.  
  155. Ram cards may or may not contain attribute memory.
  156. This causes problems because tuples must be laid out differently
  157. if there is attribute memory on the card.  The Amiga Prepcard
  158. program contains a lot of code to determine if there is
  159. attribute memory in a RAM card so that it can properly
  160. start the tuple chain.
  161.  
  162.  
  163. A. Cards that HAVE attribute memory
  164.  
  165. If present, attribute memory appears in the A600/A1200 at $A00000.
  166. In attribute memory, there are only even bytes.
  167. If a card has attribute memory, then the tuple chain must
  168. start in the attribute memory.  It can then link over to
  169. continue in the common memory.  Once linked to common memory,
  170. both even and odd bytes are used.
  171.  
  172.  
  173. B. Cards that DO NOT HAVE attribute memory
  174.  
  175. If a card has NO attribute memory, then the tuple chain starts
  176. in common memory and both even and odd bytes are used.
  177. Such a chain must start with a link target to continue the
  178. chain in common memory.  Then you can have the device tuple.
  179.  
  180. One note here - this is not entirely legal since the spec
  181. says that the first tuple in attribute memory MUST be the
  182. device tuple, or unitialized memory.  However, because some
  183. cards do not have attribute memory at all, the tuple
  184. reader in the card.resource allows for the device tuple to
  185. be in common memory following the LINK_TARGET tuple (making
  186. it possible to have a device tuple for ram cards which might
  187. not otherwise be able to have one if the spec was followed to
  188. the letter).
  189.  
  190.  
  191. C. Cards that OVERLAPPED attribute memory
  192.  
  193. Some brands of cards just make believe they have attribute memory.
  194. Such cards always read from the common memory, whether accessed
  195. at $A00000 (as attribute mem) or at $600000 (as common mem).
  196. In such cases, the tuple chain must start at the beginning
  197. of this shared memory, but be started with only the even
  198. bytes used (until it links to a common mem address, at which
  199. point both even and odd bytes must be used).
  200.  
  201.  
  202. D. Cards that have ROM attribute memory
  203.  
  204. Such cards will have unchangeable attributes specified in ROM
  205. and then the tuple chain will link over to continue in the
  206. common memory.  In such cases, only additional tuples should
  207. be specified (ie. those which have not already been specified
  208. in the ROM).
  209.  
  210. One note here - it is implied that the ROM in attribute
  211. memory has either an implied, or explicit link to common memory
  212. so the tuple chain can be continued.  If not, it is not possible
  213. to write additional tuples on this kind of card.  It is also
  214. implied that the ROM does not have tuples such as the
  215. FORMAT, GEOMETRY, or VERS_2 tuples which 'normally' would
  216. be written by a prep tool like Prepcard.
  217.  
  218.  
  219. E. Cards that have EEPROM Attribute memory
  220.  
  221. Cards with EEPROM attribute memory are not currently supported by
  222. PrepCard or PCMCIA developer tools.  We have heard that if you
  223. use PrepCard about 12 times, you might be able to prep a card with
  224. EEPROM attribute memory, but this is not recommended.
  225.  
  226.  
  227. F. Flashrom cards
  228.  
  229. In our experience so far, flashrom cards are of the overlapped
  230. type.  Flashrom cards are not easy to program and can be rendered
  231. permanently unusable if erased for too long (too long being a _very_
  232. short time).  On this release we are providing a preliminary tool
  233. called "Flash" which can program a disk image into a flashrom card.  
  234.  
  235. Of general interest, SOME flashrom cards do have internal
  236. timers which stop erase in approximately 15ms if erase
  237. verify command is not sent in this time.  Hopefully all
  238. PCMCIA flashroms will have this feature included in the future.
  239.  
  240.  
  241. Appendix I - Backing up cards
  242. =============================
  243. 1. Disk-formatted cards
  244. Bootable or unbootable disk-formatted cards may be backed up by
  245. simply doing a COPY ALL or archive to a floppy or harddisk.  This
  246. backup can be COPY ALL'd (or unarchived) to another ram credit card,
  247. and then the credit card can be INSTALL'd with the special INSTALL
  248. program if the card needs to be bootable.
  249.  
  250. 2. AmigaXIP cards
  251. Developers who wish to back up an execute-in-place card can do use
  252. a memory-range save to a floppy disk or hard disk as their backup.
  253. The common memory of an Amiga PCMCIA card appears at $600000.
  254. Overlapped-type cards only actually have memory at $600000, but
  255. if read at $A00000, the same memory appears.
  256. If a card has attribute memory, the attribute memory appears at $A00000.
  257.  
  258.  
  259. IMPORTANT! The following savemem examples use the new 39.1 savemem tool
  260. (in this archive/disk) which takes the filename first and has more error
  261. checking for args passed in wrong order.  Older versions of savemem
  262. take the filename last.
  263.  
  264. Saving card memory to a file:
  265.  
  266. For example, the common memory area of a 512K credit card can be saved
  267. to a 512K file with:
  268.  
  269. savemem filename.common 0x600000 0x67ffff
  270.  
  271. If you happen to have a PCMCIA card with real (i.e. non-overlapped)
  272. attribute memory, a separate save of attribute memory is required:
  273.  
  274. savemem filename.attr 0xA00000 0xA003ff
  275.  
  276.  
  277.  
  278. Note that savemem'd binary image backups can only be restored to
  279. another same-brand (ie. same memory layout) credit card.
  280.  
  281. Restoration may be done with the ``bload'' utility.
  282.  
  283.  
  284. bload filename.comm 0x600000
  285.  
  286. (if the PCMCIA card also has real attribute memory, you would first do:
  287. bload filename.attr 0xA00000)
  288.  
  289.